package cn.dujc.superkid.widgets;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import cn.dujc.superkid.R;

/**
 * Created by Administrator on 2018/10/22 0022.
 */

public  class EmptyView extends LinearLayout {
    private Context context;
    private View.OnClickListener onClickListener;

    public EmptyView(Context context) {
        super(context);
        this.context = context;
        initView();
    }

    public EmptyView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        this.context = context;
        initView();
    }

    public EmptyView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView();
    }

    private void initView() {
        LayoutParams params=new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
        setLayoutParams(params);
        View view = LayoutInflater.from(context).inflate(R.layout.layout_empty_img, null);
        addView(view);
    }
};